package com.github.baichuan.iot.protocol.utils;

import lombok.NonNull;

/**
 * 语法单元
 */
public class SyntaxUnit {
    private String name;

    private Object value;

    private SyntaxUnit(@NonNull String name, @NonNull Object value){
        this.name = name;
        this.value = value;
    }

    public static SyntaxUnit of(String name, Object value){
        return new SyntaxUnit(name, value);
    }

    @Override
    public String toString(){
        return name + ":" + value.toString();
    }
}
